<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
  <link href="../../css/style.css" rel="stylesheet" type="text/css" />
  <!--axios-->
  <script type="text/javascript" src="../../js/axios.js"></script>
  <script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
  <script type="text/javascript" src="../../js/api.js"></script>
  <link rel="stylesheet" href="../../layui/css/layui.css">
  <script type="text/javascript" src="../../layui/layui.js"></script>
  <script>
    $(function (){
      view();
    })
    function getParameter(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
      var r = location.search.substr(1).match(reg);
      if (r!=null) return (r[2]); return null;
    }
    function view(){
      let customId = getParameter("customId");
      let province = getParameter("province");
      let city = getParameter("city");
      var url="http://121.37.227.40:8000/"
      axios({
        url:url+'marketing/marketingView/'+customId+"/"+province+"/"+city,
        method:"POST",
        data:{
        },
        params:{
        },
        dataType:"JSON"
      }).then(function (rel){
         rel=rel.data;
         let data=rel.resultData;
        let sex=data.sex;
        if(data.sex==1){
          sex = "男";
        }else if(data.sex==2){
          sex = "女";
        }
        let status=data.status;
        if(data.status==1){
          status = "可用";
        }else if(data.status==2){
          status = "不可用";
        }
        let lis='<div class="formtitle"><span>客户信息</span></div>';
         lis+='<ul class="forminfo">\n' +
                 '    <li>\n' +
                 '      <label>姓名</label>\n' +
                 '      <cite>'+ data.customName+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>性别</label>\n' +
                 '      <cite>'+sex+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>所属公司名称</label>\n' +
                 '      <cite>'+ data.company+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>联系方式</label>\n' +
                 '      <cite>'+ data.telephone+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>联系地址</label>\n' +
                 '      <cite>'+data.homeAddress +'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>所属区域</label>\n' +
                 '      <cite>'+data.province.pName+''+data.city.cName+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>描述</label>\n' +
                 '      <cite>'+data.distract+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>状态</label>\n' +
                 '      <cite>'+status+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>创建人</label>\n' +
                 '      <cite>'+data.creator.uName+'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>创建时间</label>\n' +
                 '      <cite>'+data.createTime +'</cite>\n' +
                 '    </li>\n' +
                 '    <li>\n' +
                 '      <label>&nbsp;</label>\n' +
                 '      <input name="" type="button" class="btn" value="返回" onclick="window.history.go(-1);"/>\n' +
                 '    </li>\n' +
                 '  </ul>'
          $(".formbody").html(lis)
      })
    }
  </script>
</head>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>营销管理</li>
    <li>客户管理</li>
    <li>客户详情</li>
  </ul>
</div>
<div class="formbody">
  <div class="formtitle"><span>客户信息</span></div>
  <ul class="forminfo">
    <li>
      <label>姓名</label>
      <cite>王金平</cite>
    </li>
    <li>
      <label>性别</label>
      <cite>男</cite>
    </li>
    <li>
      <label>所属公司名称</label>
      <cite>阿里巴巴</cite>
    </li>
    <li>
      <label>联系方式</label>
      <cite>17370899727</cite>
    </li>
    <li>
      <label>联系地址</label>
      <cite>江苏南京苏铺路180号泸州花园7栋3单元1801室</cite>
    </li>
    <li>
      <label>所属区域</label>
      <cite>江苏省南京市</cite>
    </li>
    <li>
      <label>描述</label>
      <cite>阿里巴巴上市公司</cite>
    </li>
    <li>
      <label>状态</label>
      <cite>可用</cite>
    </li>
    <li>
      <label>创建人</label>
      <cite>马云</cite>
    </li>
    <li>
      <label>创建时间</label>
      <cite>2017-11-18 15:36:10</cite>
    </li>
    <li>
      <label>&nbsp;</label>
      <input name="" type="button" class="btn" value="返回" onclick="window.history.go(-1);"/>
    </li>
  </ul>
</div>
</body>
</html>
